package com.feicheng.iou.mapper;

import com.feicheng.iou.entity.RolePermission;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author tianchunlei
 * @since 2021-06-28
 */
public interface RolePermissionMapper extends BaseMapper<RolePermission> {

    /**
     * @Author wuweinan
     * @Description //插入一条用户对应的角色
     * @Date 2021/7/28 11:42
     * @Param roleId 角色Id , permissionIds权限Id集合
     * @return void
     */

    Integer insertRolePermission(Integer roleId,@Param("permissionIds") List<Integer> permissionIds);

    /**
     * @Author wuweinan
     * @Description //查询对应用户的权限
     * @Date 2021/7/28 11:42
     * @Param roleIds
     * @return void
     */
    List<Integer> selectUserPermission(@Param("roleIds") List<Integer> roleIds );

}
